<?php
namespace app\controller\model;

use app\BaseController;

class Config extends BaseController
{
    public function __construct($token=''){

    }

    public static function getAdminOpenID(){
       return [

       ];
    }
    /*
     * 错误信息回复
     */
    public function error($error){
        $error = abs($error);
        $arr = [
            301=>'优惠券不存在',
            302=>'活动未开始',
            303=>'活动已结束',
            304=>'超过领取次数',
            305=>'已被领取完',
        ];
        if(!isset($arr[$error])){return "未知错误";}
        return $arr[$error];
    }
    public static function wxConfig(){
        $config=[
            're_url'    =>  "https://api.rongyipai.cn"
            ,'htmlURL'   =>  "https://html.rongyipai.cn"
            ,'no_url' => 'https://api.rongyipai.cn/notify'
            ,'appid' => 'wx85cfa8940a70b42c'
            ,'secret' => '9d2bf04eabea24d07abd41c7e16fd0e9'
            ,'secretpay' => '9d2bf04eabea24d07abd41c7e16fd0e9'//支付相关
            ,'mchid' => '1673773428'//支付相关
            ,'app_id' => 'app_e8fc73af-884b-4e2c-a04e-30bfa065333c'//第三方app_id
            ,'cust_id' => '0604546941037440'//第三方支付商户号
        ];
        return $config;
    }
    public static function dingDing(){
        $config=[
            //旧版
            'AgentId'=>'b4f69658-0baa-47c2-bb72-5e191703eb14',
            'AgentId2'=>'2850071026',  //原企业内部应用
            'AppKey'=>'dingnggu6v7bwciylbwt',
            'AppSecret'=>'7EPFCNgwik-09fiMz9_KPPKyx84zW1rqoV_xd7YvgQzG93A6p6ejcRoQotcOrFu3',
            //新版
            'AppID'=>'b4f69658-0baa-47c2-bb72-5e191703eb14',
            'ClientID'=>'dingnggu6v7bwciylbwt',
            'ClientSecret'=>'7EPFCNgwik-09fiMz9_KPPKyx84zW1rqoV_xd7YvgQzG93A6p6ejcRoQotcOrFu3',
            //通用
            'CorpId'=>'dingb078ad81cf127529ffe93478753d9884',
            'apiToken'=>'4c4758b650383baba471322e88f59b55'

            //订阅事件通知 https://open-dev.dingtalk.com/fe/app?spm=a2q3p.21071111.0.0.554c1cfaqILeRc#/appMgr/inner/undefined/2794170734/9
            ,'aes_key'=>'DnCJZgwdvTKRLNbtJMqD5nG6KzwmhipxcZw9Okv871w'
            ,'token'=>'QTA6B1G8Kcea0Cq9bRkxH2YefbmyhDpAsMIlhWp8YACiVSrG'
        ];
        return $config;
    }
    public static function tables(){
        $arr=[
            'sellOrders'=>"sell_orders"
            ,'sellOrdersProduct'=>"sell_orders_products"
            ,'admin'=>"admin"
            ,'adminGroup'=>"admin_group"
            ,'produceOrder'=>"produce_order"
        ];
        return (object)$arr;
    }
}
